# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-recurring-ical-events
pkgver=3.3.3
pkgrel=0
pkgdesc="Python library for recurrence of ical events based on icalendar"
url="https://github.com/niccokunzmann/python-recurring-ical-events"
arch="noarch"
license="LGPL-3.0-or-later"
depends="python3 py3-icalendar py3-tz py3-tzdata py3-x-wr-timezone"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/niccokunzmann/python-recurring-ical-events/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/python-recurring-ical-events-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	# skip documentation tests; one has a random fail and another requires an extra dependency
	pytest -k 'not document' \
		--ignore test/test_readme.py
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
1b92383252c5497ff49adad5a2b5d2bb866dd72ccfd31621c305f5ec96baa5db9ca656f32787e34d9f551837cf9da769443fa017775a0d0042f6607fd138c7ef  py3-recurring-ical-events-3.3.3.tar.gz
"
